<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/templates/templateProfessor.xhtml">
	<ui:define name="conteudo">
		<h:panelGrid columns="2">
			<h:outputText value="Horário: " />
			<h:outputText value="#{mBVizualizarAula.aula.horario}" />
			<h:outputText value="Sala: " />
			<h:outputText value="#{mBVizualizarAula.aula.sala.nome}" />
			<h:outputText value="Disciplina: " />
			<h:outputText value="#{mBVizualizarAula.aula.disciplina.nome}" />
		</h:panelGrid>
		
		<h:form>
		<p:growl autoUpdate="true"/>
			<p:commandButton value="Relacao de turma" action="#{mBVizualizarAula.imprimirRelacao()}"/>
			<p:commandButton value="Encerrar Bimestre" action="#{mBVizualizarAula.encerrarBimestre}"/>
			<p:commandButton value="Inserir Chamada" action="#{mBRedirect.redirecionar()}" ajax="false">
				<f:setPropertyActionListener target="#{mBRedirect.redirecionamento}" value="/educacao/pages/professor/turma/inserirFaltas.jsf"/>
		    </p:commandButton>
			
			<p:commandButton value="Editar Chamada" action="#{mBRedirect.redirecionar()}" ajax="false">
				<f:setPropertyActionListener target="#{mBRedirect.redirecionamento}" value="/educacao/pages/professor/turma/editarFaltas.jsf"/>
		    </p:commandButton>
		    
		    <p:commandButton value="Inserir Arquivo" action="#{mBRedirect.redirecionar()}" ajax="false">
				<f:setPropertyActionListener target="#{mBRedirect.redirecionamento}" value="/educacao/pages/professor/turma/inserirArquivos.jsf"/>
		    </p:commandButton>
		    
		    <p:commandButton value="Gerenciar Avaliação" action="#{mBRedirect.redirecionar()}" ajax="false">
				<f:setPropertyActionListener target="#{mBRedirect.redirecionamento}" value="/educacao/pages/professor/turma/gerenciarAvaliacao.jsf"/>
		    </p:commandButton>	    

			

			<p:commandButton value="Inserir Plano de Aula" oncomplete="plano.show()" rendered="#{!mBVizualizarAula.possuiPlano}"/>
			
			
			<p:dialog widgetVar="plano" id="planoId" width="430" modal="true">
			
				<p:editor width="400" value="#{mBVizualizarAula.aula.plano}"/>
				
				<p:commandButton value="Inserir" action="#{mBVizualizarAula.inserirPlano}" oncomplete="plano.hide()" update="@form"  />
				<p:commandButton value="Cancelar" oncomplete="plano.hide()"/>			
			</p:dialog>
			
		</h:form>
		
	</ui:define>
</ui:composition>
</html>